package cn.bld.service;

import cn.bld.entity.SysRole;
import cn.bld.mapper.SysRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SysRoleServiceImpl implements SysRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;
    @Override
    public List<SysRole> findall() {
        return sysRoleMapper.findall();
    }

    @Override
    public int checkRole(String code) {
        return sysRoleMapper.checkRole(code);
    }

    @Override
    public int insertRole(SysRole sysRole) {
        return sysRoleMapper.insertRole(sysRole);
    }

    @Override
    public SysRole findById(Integer id) {
        return sysRoleMapper.findById(id);
    }

    @Override
    public int updateSysRole(SysRole sysRole) {
        return sysRoleMapper.updateSysRole(sysRole);
    }

    @Override
    public int deleteSysRole(Integer roleid) {
        return sysRoleMapper.deleteSysRole(roleid);
    }
}
